# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-lwp-useragent-determined
_pkgreal=LWP-UserAgent-Determined
pkgver=1.07
pkgrel=4
pkgdesc="a virtual browser that retries errors"
url="https://metacpan.org/release/LWP-UserAgent-Determined/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-libwww"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/A/AL/ALEXMV/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="
bed056468366bf86f0711a23c5bdb502a614efa2fd80d632f8d43d33295309d0ee88e439933cb3eda99192ad7d7025d0a7f6f0a53a45e79e70512771bb58ae7d  LWP-UserAgent-Determined-1.07.tar.gz
"
